package ar.com.braghini.analisis.lenguajes;

import java.net.URL;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.fxml.JavaFXBuilderFactory;
import javafx.geometry.Rectangle2D;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Screen;
import javafx.stage.Stage;

public class Main extends Application {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		launch(args);
	}

	@Override
	public void start(Stage stage) throws Exception {
		URL location = getClass().getResource("ventanaPrincipal.fxml");
		stage.setTitle("Analisis de Lenguajes");
		FXMLLoader fxmlLoader = new FXMLLoader();

		fxmlLoader.setLocation(location);
		fxmlLoader.setBuilderFactory(new JavaFXBuilderFactory());

		AnchorPane page = (AnchorPane) fxmlLoader.load();

		// Fade transition opcional.
		// undecoratorScene.setFadeInTransition();

		stage.setScene(new Scene(page));
		stage.sizeToScene();
		stage.show();
		stage.toFront();

		Rectangle2D primScreenBounds = Screen.getPrimary().getBounds();
		stage.setX(primScreenBounds.getWidth() - stage.getWidth());
		stage.setY(0);
		System.out.println("Llego");

	}

}
